{% extends "base.html" %} {% block title %}Patient Medical History - Admin Panel{% endblock %} {% block content %}

Medical History

{{ patient_user.name }} - Complete medical records

Back to Patient
{% if patient_user.profile_picture %} {{ patient_user.name }} {% else %} {{ patient_user.name[0].upper() }} {% endif %}
{{ patient_user.name }}

{{ patient_user.email }}

{% if grouped_histories %} {% for disease, histories in grouped_histories.items() %}
{{ disease.title() }}
{% for history in histories %}
{{ history.doctor.user.name }}

{{ history.created_at.strftime('%B %d, %Y') }} {{ history.created_at.strftime('%I:%M %p') }}

{% if history.diagnosis %}
Diagnosis:
{{ history.diagnosis }}
{% endif %} {% if history.prescription %}
Prescription:
{{ history.prescription | nl2br }}
{% endif %} {% if history.treatment_notes %}
Treatment Notes:
{{ history.treatment_notes }}
{% endif %}
{% if history.appointment %} View Appointment {% endif %}
{% endfor %}
{% endfor %} {% else %}
No medical history found

This patient has no medical history records yet.

{% endif %}
{% endblock %}